﻿<UserControl x:Class="LiveTiss.Guias.UserControls.GuiaOdontologiaProcedimentosExecutados"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    mc:Ignorable="d" x:Name="uc"
    d:DesignHeight="300" d:DesignWidth="400" Height="Auto" Width="910">

    <Grid Margin="0,19,0,0" VerticalAlignment="Top">
        <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
        <TextBlock TextWrapping="Wrap" Text="Procedimentos Realizados" Margin="10,10,8,0" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="16"/>
        <StackPanel Margin="12,44,8,0">

            <ItemsControl ItemsSource="{Binding Path=Value.procedimentoExecutado, ElementName=uc, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <ContentControl>
                            <Grid Background="#FFD9F1F1" Margin="12,14,14,0" VerticalAlignment="Top" Loaded="Grid_Loaded">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="33"/>
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <Grid Margin="8,0,0,-2" Grid.Row="0">
                                    <TextBlock TextWrapping="Wrap" Text="01" FontSize="16"/>
                                    <Button x:Name="btnExcluir" Content="X" HorizontalAlignment="Right" Margin="0,4,6,6" Width="25" Height="25" Style="{StaticResource Fechar_TipoGuia}" Foreground="White"
                                            Click="btnExcluir_Click"/>
                                </Grid>
                                <uc:GuiaOdontologiaProcedimentosExecutadosProcedimentoExecutado Grid.Row="1" x:Name="ucGuiaOdontologiaProcedimentosExecutadosProcedimentoExecutado"
                                    Value="{Binding Path=Current,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
                            </Grid>
                        </ContentControl>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>

            <Grid Margin="0,6,14,0" HorizontalAlignment="Right">
                <Button x:Name="btnNovo" Content="Novo Procedimento" Width="121" Height="25" Click="btnNovo_Click"/>
            </Grid>
            
            <Grid Height="53" Margin="0,0,6,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Quantidade Total US:" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox Margin="0,6,323,0" Text="{Binding Path=Value.quantidadeTotalUS, ElementName=uc, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
                </StackPanel>
            </Grid>
            <Grid Height="53" Margin="0,0,6,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Total Franquia de Coparticipação:" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox Margin="0,6,323,0" Text="{Binding Path=Value.totalFranquiaCoparticipacao, ElementName=uc, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
                </StackPanel>
            </Grid>
            <Grid Height="53" Margin="0,0,6,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Valor Total:" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox Margin="0,6,323,0" Text="{Binding Path=Value.valorTotal, ElementName=uc, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" />
                </StackPanel>
            </Grid>
        </StackPanel>
    </Grid>
</UserControl>
